package com.rc.saas.tenant.model.order;

import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;

public class OrderInfoDiscountTypeConverter implements Converter<String> {

    @Override
    public Class supportJavaTypeKey() {
        return null;
    }

    @Override
    public CellDataTypeEnum supportExcelTypeKey() {
        return null;
    }

    @Override
    public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        return null;
    }

    @Override
    public CellData convertToExcelData(String value, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        if ("0".equals(value)) {
            return new CellData("满减券");
        } else if ("1".equals(value)) {
            return new CellData("满减卷");
        } else if ("2".equals(value)) {
            return new CellData("满折卷");
        } else if ("3".equals(value)) {
            return new CellData("满折卷");
        } else if ("4".equals(value)) {
            return new CellData("代金券");
        } else if ("5".equals(value)) {
            return new CellData("生日免单");
        } else if ("6".equals(value)) {
            return new CellData("生日礼遇减免");
        } else if ("7".equals(value)) {
            return new CellData("会员优惠");
        } else if ("8".equals(value)) {
            return new CellData("权益金");
        } else if ("9".equals(value)) {
            return new CellData("企业优惠");
        } else if ("10".equals(value)) {
            return new CellData("活动满减");
        } else {
            return new CellData("未知");
        }
    }
}
